﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EcoSystem
{
    /// <summary>
    /// socket消息发送服务
    /// </summary>
    public interface IMessagingHubAppService
    {
        /// <summary>
        /// 发送消息数据
        /// </summary>
        /// <param name="message"></param>
        /// <returns></returns>
        public Task SendMessageAsync(HubMessageDto message);

        /// <summary>
        /// 发送页面通知消息数据
        /// </summary>
        /// <param name="notification"></param>
        /// <returns></returns>
        public Task SendNotificationAsync(HubNotificationDto notification);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="notification"></param>
        /// <returns></returns>
        public Task SendNotificationsAsync(List<HubNotificationDto> notification);

        /// <summary>
        /// 发送后台静默消息
        /// </summary>
        /// <param name="data"></param>
        /// <param name="userIds"></param>
        /// <returns></returns>
        public Task SendSilentMessageAsync(object data, params Guid[] userIds);

        /// <summary>
        /// 发送其它方法数据消息
        /// </summary>
        /// <param name="userIds"></param>
        /// <param name="method"></param>
        /// <param name="args"></param>
        /// <returns></returns>
        public Task InvokeMethodAsync(List<Guid> userIds, string method, params object[] args);

    }
}
